// matrix_exception.h
#ifndef MATRIX_EXCEPTION_H
#define MATRIX_EXCEPTION_H

#include <exception>

/**
 * Exception thrown from the matrix classes (Matrix and MatrixImplementation).
 * Constructed with a string which can be extracted trough the what() member function.
 */
class MatrixException : std::exception 
{
private:
    std::string _what;

public:
    explicit MatrixException(std::string const & what) throw() : _what(what) { }
    ~MatrixException() throw() { }

    char const * what() const throw() { return _what.c_str(); }
};

#endif // MATRIX_EXCEPTION_H
